*** Keywords ***
Login As Admin
    Go To    ${URL}
    # 如果有登录页可以模拟输入用户名密码

Click Add User
    Click Link    link=新增

Fill User Form
    [Arguments]    ${name}    ${age}    ${gender}    ${phone}
    Input Text    name=name    ${name}
    Input Text    name=age    ${age}
    Run Keyword If    '${gender}' == '男'
    ...    Click Element    //input[@value='男']
    Run Keyword If    '${gender}' == '女'
    ...    Click Element    //input[@value='女']
    Input Text    name=phone    ${phone}

Submit Form
    Click Button    xpath=//button[contains(text(), '保存')]
    Wait For Success Message